import 'package:elmer_tools/common/dataBase/DataBaseAdapter.dart';
import 'package:elmer_tools/common/dataBase/DataTable.dart';
import 'package:elmer_tools/common/dataBase/SqliteAdapter.dart';

class Connection {
    String engine;
    List<DataTable> tables = [];
    Connection({
        required this.engine,
        required this.tables,
    });
    DataBaseAdapter? getInstance() {
        if(engine == "sqlite") {
            return SqliteAdapter(tables);
        }
        return null;
    }
    void init() {
        DataBaseAdapter? adapter = getInstance();
        if(adapter != null) {
            adapter.init();
        }
    }
}
